#ifndef __PACKET_H__
#define __PACKET_H__

#include <iostream>
#include <fstream>
#include "Syncconf.h"

class OutPacket {
    Syncconf conf;
    std::ofstream table_dat;
    std::ofstream table_del;
    std::ofstream packet_info;
    int prevpacket;
    int curpacket;
    std::string node;
public:
    OutPacket(std::string node);
    void addTable(std::string name, std::string fields, std::string condi, std::string alias);
    ~OutPacket();
};

class InPacket {
    Syncconf conf;
    std::ofstream table_dat;
    std::ofstream table_del;
    std::ofstream packet_info;
    int prevpacket;
    int curpacket;
    std::string node;
public:
    InPacket(std::string node);
    void loadTable(std::string name);
    ~InPacket();
};

#endif /* __PACKET_H__ */
